﻿using System.ComponentModel.DataAnnotations;
using EPiServer;
using EPiServer.Core;
using EPiServer.DataAnnotations;
using EPiServer.Web;

namespace StarterKit.Web.Models.Blocks
{
    /// <summary>
    /// Used to present contact information with a call-to-action link
    /// </summary>
    /// <remarks>Actual contact details are retrieved from a contact page specified using the ContactPageLink property</remarks>
    [ContentType(
        DisplayName = "Contact Block",
        Description = "Contact Block Description",
        GroupName = "Default",
        Order = 100)]
    public class ContactBlockData : BaseBlockData
    {
        [Display(
            Order = 1)]
        [CultureSpecific]
        [UIHint(UIHint.Image)]
        public virtual ContentReference Image { get; set; }

        [Display(
            Order = 2)]
        [CultureSpecific]
        public virtual string Heading { get; set; }

        /// <summary>
        /// Gets or sets the contact page from which contact information should be retrieved
        /// </summary>
        [Display(
            Order = 3)]
        public virtual PageReference ContactPageLink { get; set; }
        
        [Display(
            Order = 4)]
        [CultureSpecific]
        public virtual string LinkText { get; set; }

        [Display(
            Order = 5)]
        [CultureSpecific]
        public virtual Url LinkUrl { get; set; }
    }
}